< previous page page_191 next page >

Page 191
12181-0191a.gif
Figure 7.20.
Using a splash form as the main startup form
for an application tells the user that something
is happening.
In order to use this form, you must add a code module to the project. You display a splash form by having the SUB MAIN routine execute when the application starts. In this routine, place the following code, which displays the splash form and then loads the main MDI parent form:
Sub Main()
    frmSplash.Show
    frmSplash.Refresh
    mdiMainForm.Show
End Sub
Then, when the mdiMainForm has finished loading and is displayed, the splash form will be unloaded. Depending on how long it takes for the main form to load, the splash form might not stay on the screen for very long. To control the length of time it is visible, you could place a Timer control on the mdiMainForm and have the timer event unload the splash form when it is triggered.
Another form template that you can add to your application is the About dialog box. This is the same standard form that you see whenever you choose Help | About from most Windows applications (see Figure 7.21). This dialog box is usually shown only from the Help menu.
In addition, the About dialog box has a button on it which has code already in it that will execute the Microsoft System Information application that displays many different types of system-related information (see Figure 7.22).
The information displayed on both of these forms can be retrieved directly from the application. The location of most of the information is the properties of the project. When you create your application project, you would enter the information shown in Figure 7.23. This information can then be accessed using the APP object properties in your code.

 
< previous page page_191 next page >

If you like this book, buy it!